Previous Book Contents Book Index Next

Inside Macintosh: Programming With the Text Encoding Conversion Manager /
Chapter 4 - Unicode Converter Reference / Unicode Converter Functions
Obtaining Mapping Information /


CountUnicodeMappings

Counts available mappings that meet the specified matching criteria.

pascal OSStatus CountUnicodeMappings (
      OptionBits iFilter
      ConstUnicodeMappingPtr iFindMapping
      ItemCount *oActualCount);
iFilter
Filter control flags representing the six subfields of the Unicode mapping structure that this function uses to match against in determining which mappings on the system to return to your application. The filter control enumeration, described in "Filter Control Flags" (page 116), define the constants for the subfield's flags and their masks. You can include in the search criteria any of the three text encoding subfields for both the Unicode encoding and the other specified encoding. For any flag not turned on, the subfield value is ignored and the function does not check the corresponding subfield of the mappings on the system.
iFindMapping
A structure of type UnicodeMapping (page 118) containing the text encodings whose field values are to be matched.
oActualCount
A pointer to a value of type ItemCount. On output, the number of matching mappings found.
function result
A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) in the chapter "Basic Text Types Reference."
DISCUSSION
You can use the function to obtain the count of mappings that meet specified criteria by setting individual filter control flags. You can filter on any of the three text encoding subfields of the Unicode mapping structure's unicodeEncoding specification and on any of the three text encoding subfields of the structure's otherEncoding specification. The iFilter parameter consists of a set of six control flags that you set to identify which of the corresponding six subfields to include in the match count. No filtering is performed on fields for which you do not set the corresponding filter control flag.

SEE ALSO
The function QueryUnicodeMappings (page 167)


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1997